package common;

import java.util.ArrayList;

import entity.Menu;

public class Funcs {
	
	// get leftmenu list
	// @param parentId 
	public static ArrayList<Menu> getLeftMenu(int parentId){
		ArrayList<Menu> menus = new ArrayList<Menu>();
		if (parentId == 0)			// Admin
		{
			Menu menu1 = new Menu();
			menu1.setMenuTitle("User Manage");
			menu1.setMenuUrl("Admin/UserList.jsp");
			menus.add(menu1);
			
			Menu menu2 = new Menu();
			menu2.setMenuTitle("Object Manage");
			menu2.setMenuUrl("ObjectList.jsp");
			menus.add(menu2);
		}
		else if (parentId == 1) 	// Security
		{
			Menu menu1 = new Menu();
			menu1.setMenuTitle("Insurance");
			menu1.setMenuUrl("InsuranceList.jsp");
			menus.add(menu1);
		}
		else if (parentId == 2)		// Marketing
		{
			Menu menu1 = new Menu();
			menu1.setMenuTitle("Ticket Manage");
			menu1.setMenuUrl("TicketsList.jsp");
			menus.add(menu1);
		}
		return menus;
	}
			
}
